.class public final Lcom/ninesky/widget/d;
.super Lcom/ninesky/widget/g;


# instance fields
.field private b:Ljava/util/HashMap;

.field private c:Ljava/util/HashMap;

.field private d:I

.field private e:Landroid/widget/LinearLayout;

.field private f:Landroid/widget/GridView;

.field private g:Lcom/ninesky/widget/e;

.field private h:Landroid/view/View$OnClickListener;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    invoke-direct {p0, p1}, Lcom/ninesky/widget/g;-><init>(Landroid/content/Context;)V

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/ninesky/widget/d;->b:Ljava/util/HashMap;

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/ninesky/widget/d;->c:Ljava/util/HashMap;

    const/4 v0, 0x0

    iput v0, p0, Lcom/ninesky/widget/d;->d:I

    new-instance v0, Lcom/ninesky/widget/k;

    invoke-direct {v0, p0}, Lcom/ninesky/widget/k;-><init>(Lcom/ninesky/widget/d;)V

    iput-object v0, p0, Lcom/ninesky/widget/d;->h:Landroid/view/View$OnClickListener;

    const v0, 0x7f030018

    invoke-virtual {p0, v0}, Lcom/ninesky/widget/d;->a(I)Landroid/view/View;

    move-result-object v1

    const v0, 0x7f0c0040

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/ninesky/widget/d;->e:Landroid/widget/LinearLayout;

    const v0, 0x7f0c003f

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/GridView;

    iput-object v0, p0, Lcom/ninesky/widget/d;->f:Landroid/widget/GridView;

    new-instance v0, Lcom/ninesky/widget/e;

    invoke-direct {v0, p0}, Lcom/ninesky/widget/e;-><init>(Lcom/ninesky/widget/d;)V

    iput-object v0, p0, Lcom/ninesky/widget/d;->g:Lcom/ninesky/widget/e;

    iget-object v0, p0, Lcom/ninesky/widget/d;->f:Landroid/widget/GridView;

    iget-object v1, p0, Lcom/ninesky/widget/d;->g:Lcom/ninesky/widget/e;

    invoke-virtual {v0, v1}, Landroid/widget/GridView;->setAdapter(Landroid/widget/ListAdapter;)V

    return-void
.end method

.method static synthetic a(Lcom/ninesky/widget/d;)Ljava/util/HashMap;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/widget/d;->c:Ljava/util/HashMap;

    return-object v0
.end method

.method static synthetic a(Lcom/ninesky/widget/d;I)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/ninesky/widget/d;->b(I)V

    return-void
.end method

.method private b(I)V
    .locals 5

    iput p1, p0, Lcom/ninesky/widget/d;->d:I

    iget-object v1, p0, Lcom/ninesky/widget/d;->b:Ljava/util/HashMap;

    invoke-virtual {v1}, Ljava/util/HashMap;->values()Ljava/util/Collection;

    move-result-object v1

    invoke-interface {v1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-nez v1, :cond_0

    iget-object v1, p0, Lcom/ninesky/widget/d;->g:Lcom/ninesky/widget/e;

    iget v2, p0, Lcom/ninesky/widget/d;->d:I

    invoke-virtual {v1, v2}, Lcom/ninesky/widget/e;->a(I)V

    return-void

    :cond_0
    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    move-object v0, v1

    check-cast v0, Landroid/view/View;

    move-object v2, v0

    invoke-virtual {v2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    iget v4, p0, Lcom/ninesky/widget/d;->d:I

    if-ne v1, v4, :cond_1

    const/4 v1, 0x1

    invoke-virtual {v2, v1}, Landroid/view/View;->setSelected(Z)V

    goto :goto_0

    :cond_1
    const/4 v1, 0x0

    invoke-virtual {v2, v1}, Landroid/view/View;->setSelected(Z)V

    goto :goto_0
.end method


# virtual methods
.method public final a()V
    .locals 1

    iget-object v0, p0, Lcom/ninesky/widget/d;->g:Lcom/ninesky/widget/e;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/widget/d;->g:Lcom/ninesky/widget/e;

    invoke-virtual {v0}, Lcom/ninesky/widget/e;->notifyDataSetChanged()V

    :cond_0
    return-void
.end method

.method public final a(I[Lcom/ninesky/widget/QuickActionItem;)V
    .locals 2

    iget-object v0, p0, Lcom/ninesky/widget/d;->c:Ljava/util/HashMap;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/ninesky/widget/d;->b(I)V

    return-void
.end method

.method public final a([Ljava/lang/CharSequence;)V
    .locals 7

    const/4 v6, 0x0

    if-nez p1, :cond_1

    :cond_0
    return-void

    :cond_1
    iput v6, p0, Lcom/ninesky/widget/d;->d:I

    iget-object v0, p0, Lcom/ninesky/widget/d;->a:Landroid/content/Context;

    const/high16 v1, 0x4220

    invoke-static {v0, v1}, Lcom/ninesky/a/c;->a(Landroid/content/Context;F)I

    move-result v0

    array-length v1, p1

    iget-object v2, p0, Lcom/ninesky/widget/d;->e:Landroid/widget/LinearLayout;

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->removeAllViews()V

    move v2, v6

    :goto_0
    if-ge v2, v1, :cond_0

    new-instance v3, Landroid/widget/Button;

    iget-object v4, p0, Lcom/ninesky/widget/d;->a:Landroid/content/Context;

    invoke-direct {v3, v4}, Landroid/widget/Button;-><init>(Landroid/content/Context;)V

    aget-object v4, p1, v2

    invoke-virtual {v3, v4}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    if-nez v2, :cond_2

    const v4, 0x7f02006e

    :goto_1
    invoke-virtual {v3, v4}, Landroid/widget/Button;->setBackgroundResource(I)V

    iget-object v4, p0, Lcom/ninesky/widget/d;->a:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v5, 0x7f060001

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getColor(I)I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/Button;->setTextColor(I)V

    invoke-virtual {v3, v6, v6, v6, v6}, Landroid/widget/Button;->setPadding(IIII)V

    new-instance v4, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v4, v6, v0}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    const/high16 v5, 0x3f80

    iput v5, v4, Landroid/widget/LinearLayout$LayoutParams;->weight:F

    iput v6, v4, Landroid/widget/LinearLayout$LayoutParams;->leftMargin:I

    iput v6, v4, Landroid/widget/LinearLayout$LayoutParams;->rightMargin:I

    iput v6, v4, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    iput v6, v4, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    iget-object v5, p0, Lcom/ninesky/widget/d;->e:Landroid/widget/LinearLayout;

    invoke-virtual {v5, v3, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/Button;->setTag(Ljava/lang/Object;)V

    iget-object v4, p0, Lcom/ninesky/widget/d;->h:Landroid/view/View$OnClickListener;

    invoke-virtual {v3, v4}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v4, p0, Lcom/ninesky/widget/d;->b:Ljava/util/HashMap;

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v4, v5, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_2
    const/4 v4, 0x1

    sub-int v4, v1, v4

    if-ne v2, v4, :cond_3

    const v4, 0x7f020070

    goto :goto_1

    :cond_3
    const v4, 0x7f02006f

    goto :goto_1
.end method
